#include <iostream>

using namespace std;

const int N = 2010, MOD = 1e8;
int dp[N][N], w[N];
int n, f;

int main()
{
	cin >> n >> f;
	for(int i = 1; i <= n; i++) cin >> w[i];
	
	dp[0][0] = 1;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 0; j < f; j++)
		{
			dp[i][j] = dp[i - 1][j] + dp[i - 1][(((j - w[i] % f) % f) + f) % f];
			dp[i][j] %= MOD;
		}
	}
	cout << dp[n][0] - 1 << endl;
	return 0;
}
